import { DashboardIcon, SystemSettingIcon } from 'tdesign-icons-vue-next';
import { shallowRef } from 'vue';

import Layout from '@/layouts/index.vue';

export default [
  {
    path: '/member',
    component: Layout,
    redirect: '/member/base',
    name: 'member',
    meta: {
      title: {
        zh_CN: '运营中心',
        en_US: 'Operation center',
      },
      icon: shallowRef(SystemSettingIcon),
      orderNo: 0,
      hiddenBreadcrumb: false,
    },
    children: [
      {
        path: 'base',
        name: 'MemberBase',
        component: () => import('@/pages/member/base/index.vue'),
        meta: {
          title: {
            zh_CN: '充值划卡管理',
            en_US: 'Recharge card management',
          },
        },
      },
      {
        path: 'detail/:id',
        name: 'MemberDetail',
        component: () => import('@/pages/member/detail/index.vue'),
        meta: {
          title: {
            zh_CN: '会员划卡详情',
            en_US: 'Membership card details',
          },
          hidden: true,
        },
      },
      {
        path: 'usedetail/:cardType',
        name: 'UseDetail',
        component: () => import('@/pages/member/usedetail/index.vue'),
        meta: {
          title: {
            zh_CN: '已划卡列表',
            en_US: 'use card list',
          },
          hidden: true,
        },
      },
    ],
  },
  {
    path: '/dashboard',
    component: Layout,
    redirect: '/dashboard/base',
    name: 'dashboard',
    meta: {
      title: {
        zh_CN: '数据中心',
        en_US: 'Data center',
      },
      icon: shallowRef(DashboardIcon),
      orderNo: 0,
    },
    children: [
      {
        path: 'base',
        name: 'DashboardBase',
        component: () => import('@/pages/dashboard/base/index.vue'),
        meta: {
          title: {
            zh_CN: '概览仪表盘',
            en_US: 'Overview',
          },
        },
      },
      {
        path: 'detail',
        name: 'DashboardDetail',
        component: () => import('@/pages/dashboard/detail/index.vue'),
        meta: {
          title: {
            zh_CN: '统计报表',
            en_US: 'Dashboard Detail',
          },
        },
      },
    ],
  },
];
